package com.example.workspace.douying;



import com.example.workspace.dto.PositionDto;
import com.example.workspace.utils.MouseUtils;
import com.example.workspace.utils.ToolUtils;

import java.awt.*;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;

public class CancelLike {

    public static void main(String[] args) {
        try {

            int likeCnt = 100;

            //我的 x:121,y:468
            //喜欢 x:503,y:484
            //视频 x:446,y:683
            Thread.sleep(3000);

            Robot robot = new Robot();


            //进入到喜欢的列表页面
            List<PositionDto> list = new ArrayList<>();
            list.add(new PositionDto(121,468));
            list.add(new PositionDto(503,484));
            list.add(new PositionDto(446,683));

            MouseUtils.mouseMoveAndClick(robot,list,3);



            for (int i = 0; i < likeCnt; i++) {

               ToolUtils.keyPress(robot,KeyEvent.VK_DOWN,KeyEvent.VK_Z);
            }



        } catch (InterruptedException e) {
            e.printStackTrace();
        } catch (AWTException e) {
            e.printStackTrace();
        }

    }
}
